gso: fix dodgy bit handling for GSO_UDP_L4
authorYan Zhai <yan@cloudflare.com>
Thu, 13 Jul 2023 17:28:00 +0000 (10:28 -0700)
committerSalvatore Bonaccorso <carnil@debian.org>
Mon, 26 Aug 2024 19:47:39 +0000 (21:47 +0200)
commitec2e47fa66126d73f14faa8ad07636a98345d299
tree20c5d9cecc216f7c1420bde7913228402fcea812
parent4f09502f2eb070b8542bee4708b1a7adee17ad08
gso: fix dodgy bit handling for GSO_UDP_L4

Origin: https://git.kernel.org/linus/9840036786d90cea11a90d1f30b6dc003b34ee67

Commit 1fd54773c267 ("udp: allow header check for dodgy GSO_UDP_L4
packets.") checks DODGY bit for UDP, but for packets that can be fed
directly to the device after gso_segs reset, it actually falls through
to fragmentation:

https://lore.kernel.org/all/CAJPywTKDdjtwkLVUW6LRA2FU912qcDmQOQGt2WaDo28KzYDg+A@mail.gmail.com/

This change restores the expected behavior of GSO_UDP_L4 packets.

Fixes: 1fd54773c267 ("udp: allow header check for dodgy GSO_UDP_L4 packets.")
Suggested-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name gso-fix-dodgy-bit-handling-for-GSO_UDP_L4.patch
net/ipv4/udp_offload.c
net/ipv6/udp_offload.c